from . import models
from rest_framework import serializers


class GoodsSerializer(serializers.ModelSerializer):
     class Meta:
        fields = '__all__' 
        model = models.GoodsChannle

class CategoriesListSerializer(serializers.ModelSerializer):

    """列表页序列化器"""
    class Meta:
        model = models.GoodsSku
        fields = "__all__"


class GoodsspuSerializer(serializers.ModelSerializer):
    """spu序列化器"""
    # create_time = serializers.DateField(read_only=True)
    # update_time = serializers.DateField(read_only=True)

    class Meta:
        model = models.Goods
        fields = ('desc_detail','desc_pack','desc_service')